﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ColliderEvents : MonoBehaviour {

    public List<Rigidbody> touchRigidBodys;
	// Use this for initialization
	void Start () {
        touchRigidBodys = new List<Rigidbody>();
    }
    private void FixedUpdate()
    {
        touchRigidBodys.Clear();
    }
    private void OnCollisionStay(Collision collision)
    {
        if (collision.rigidbody != null)
            touchRigidBodys.Add(collision.rigidbody);
    }
}
